package servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import service.OyxUser_levelMessageService;
import service.OyxVipUsermessageService;
import service.impl.OyxUser_levelMessageServiceImpl;
import service.impl.OyxVipUsermessageServiceImpl;


public class OyxAdminShowMemberServlet extends HttpServlet {

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");		
		OyxVipUsermessageService vum = new OyxVipUsermessageServiceImpl();
		OyxUser_levelMessageService ulms = new OyxUser_levelMessageServiceImpl();
	
		//调用方法获取全部会员数量
		Integer vipUser_InfSum = vum.getVipUser_InfSum();
		request.setAttribute("vipUser_InfSum", vipUser_InfSum);
		Integer level01 = vum.getVipUser_InfSumLevel(1);
		request.setAttribute("level01", level01);
		Integer level02 = vum.getVipUser_InfSumLevel(2);
		request.setAttribute("level02", level02);
		Integer level03 = vum.getVipUser_InfSumLevel(3);
		request.setAttribute("level03", level03);
		Integer level04 = vum.getVipUser_InfSumLevel(4);
		request.setAttribute("level04", level04);
		Integer level05 = vum.getVipUser_InfSumLevel(5);
		request.setAttribute("level05", level05);
		System.out.println(level01+level02+level03+level04+level05);
		request.getRequestDispatcher("Member_Member.jsp").forward(request, response);
	}


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
